home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / PROGRAMR / OLE2BOOK.ZIP / CHAP06.ZIP / CHAP06 / DATAUSER / MAKEFILE < prev    next >
Text File  |  1993-04-21  |  2KB  |  96 lines

  1. #
  2. # MAKEFILE
  3. # Application that uses the Data Objects Chapter 6
  4. #
  5. # Copyright (c)1993 Microsoft Corporation, All Rights Reserved
  6. #
  7. # Kraig Brockschmidt, Software Design Engineer
  8. # Microsoft Systems Developer Relations
  9. #
  10. # Internet  :  kraigb@microsoft.com
  11. # Compuserve:  >INTERNET:kraigb@microsoft.com
  12. #
  13.  
  14. #Add '#' to the next line for 'noisy' operation
  15. !CMDSWITCHES +s
  16.  
  17. #
  18. #Compiler flags
  19. #Use "SET RETAIL=1" from MS-DOS to compile non-debug version.
  20. #
  21. !ifndef RETAIL
  22. CFLAGS  = -c -nologo -Od -AS -Zipe -G2s -W3 -GA -GEs
  23. LINK    = /al:16/ONERROR:NOEXE/CO
  24. DEFS    = -DSTRICT -DDEBUG
  25. !else
  26. CFLAGS  = -c -nologo -Oas -AS -Zpe -G2s -W3 -GA -GEs
  27. LINK    = /al:16/ONERROR:NOEXE
  28. DEFS    = -DSTRICT
  29. !endif
  30.  
  31. .SUFFIXES: .h .obj .exe .cpp .res .rc
  32.  
  33. TARGET  = datauser
  34.  
  35. goal:   precomp.pch $(TARGET).exe
  36.  
  37. clean:
  38.     del *.pch
  39.     del *.obj
  40.     del *.res
  41.     del *.exe
  42.  
  43. PCHFLAGS= -Yu$(TARGET).h -Fpprecomp.pch
  44.  
  45. LIBS    = libw slibcew compobj ole2 storage
  46. INCLS   = $(TARGET).h
  47. OBJS    = $(TARGET).obj iadvsink.obj
  48. RCFILES = $(TARGET).ico
  49.  
  50.  
  51. #####
  52.  
  53. .cpp.obj:
  54.     echo ++++++++++
  55.     echo Compiling $*.cpp
  56.     cl $(CFLAGS) $(PCHFLAGS) $(DEFS) $*.cpp
  57.  
  58. .rc.res:
  59.     echo +++++++++
  60.     echo Compiling Resources
  61.     rc -r $(DEFS) $*.rc
  62.  
  63. precomp.pch : $(TARGET).h
  64.     echo +++++++++
  65.     echo Precompiling $(TARGET).h
  66.     cl $(CFLAGS) $(DEFS) -Yc$(TARGET).h -Fpprecomp.pch -Foprecomp precomp.cpp
  67.  
  68.  
  69.  
  70. #This rule builds a linker response file on the fly depending on debug flags
  71. $(TARGET).exe : $(OBJS) $(TARGET).res $(TARGET).def
  72.     echo ++++++++++
  73.     echo Linking $@
  74.     echo precomp.obj +                           > $(TARGET).lrf
  75.     echo $(OBJS)                                >> $(TARGET).lrf
  76.  
  77.     echo $(TARGET).exe $(LINK)                  >> $(TARGET).lrf
  78.     echo nul/li                                 >> $(TARGET).lrf
  79.     echo $(LIBS)/NOD/NOE                        >> $(TARGET).lrf
  80.     echo $(TARGET).def                          >> $(TARGET).lrf
  81.  
  82.     link @$(TARGET).lrf
  83.     rc -v $(TARGET).res $(TARGET).exe
  84.     del $(TARGET).lrf
  85.  
  86.  
  87. ##### Dependencies #####
  88.  
  89. $(TARGET).obj : $(TARGET).cpp $(INCLS)
  90.     echo +++++++++
  91.     echo Compiling $*.cpp
  92.     cl -nologo $(CFLAGS) $(DEFS) $*.cpp
  93.  
  94. iadvsink.obj  : iadvsink.cpp  $(INCLS)
  95. $(TARGET).res : $(TARGET).rc  $(INCLS) $(RCFILES)
  96.